Skip to content

OCLOMRS-1124: Use v5 UUIDs for ConceptClasses in OCL imports#125

Merged
ibacher merged 1 commit intoopenmrs:masterfrom
sourav-jyoti:fix/OCLOMRS
Apr 14, 2026
Merged

OCLOMRS-1124: Use v5 UUIDs for ConceptClasses in OCL imports#125
ibacher merged 1 commit intoopenmrs:masterfrom
sourav-jyoti:fix/OCLOMRS

Conversation

@sourav-jyoti
Copy link
Copy Markdown
Contributor

Issue

When the OCL module creates a new ConceptClass during import , the UUID is randomly generated. This means different OpenMRS instances importing the same OCL source end up with different UUIDs for the same concept class, breaking data synchronization (dbsync, Initializer) and making portable configuration impossible.

Fix

Generate a deterministic version 5 (name-based) UUID for newly created ConceptClass entities using:

conceptClass.setUuid(version5Uuid("conceptClass/" + name).toString());

Changes:

Saver.java — Added setUuid(...) call when creating a new ConceptClass
SaverTest.java — Enhanced existing test to verify UUID is deterministic; added new test using "Drug route" as the class name to confirm consistent UUID generation
Existing concept classes already in the database are not affected.

@denniskigen denniskigen requested a review from ibacher April 14, 2026 12:58
@ibacher ibacher changed the title OCLOMRS-1124 : Use deterministic UUID for newly created ConceptClass during OCL import OCLOMRS-1124: Use v5 UUIDs for ConceptClasses in OCL imports Apr 14, 2026
@ibacher ibacher merged commit c2d7ab6 into openmrs:master Apr 14, 2026
8 checks passed
@sourav-jyoti sourav-jyoti deleted the fix/OCLOMRS branch April 14, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants